package lesson.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.print.DocFlavor;


/**
 * @Description:
 * @Author: Wanzhen
 * @Date: 2022/6/12-14:44
 */
@TableName("user_tbl")
@Data
public class User {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private String username;
    private String password;
    private String salt;  //做加密功能
    private String sex;
    private Integer age;
    private String phone;
    private Integer card;
    private String address;
    private String img;

    //实际作为外键使用
    //private Integer roleId;
    private Integer teamId; //班级
    private Integer academyId; //学院
    private Integer teacherId; //所属老师

    //非数据库列 班级名字 学院名字 老师名字
    @TableField(exist = false)
    private String teamName;
    @TableField(exist = false)
    private String academyName;
    @TableField(exist = false)
    private String teacherName;
}
